package com.example.javabasic.shejimoshi.chouxianggongchang.demo1;
//抽象工厂测试类
public class Test {

    public static void main(String[] args) {
        //抽象工厂
        AbstractFactory factory = new ConcreteFactory1();
        //生成产品A
        Product product = factory.newProductA();
        //生成产品B
        Product product1 = factory.newProductB();
        product.helloFactory();
        product1.helloFactory();
    }
}
